function deleteAdmin(id){//删除图书管理员函数
    if(confirm("确认删除？")){//提示弹窗
        var token=sessionStorage.getItem("token");
        $.ajax({
            url:"http://lenjon.top:9090/admin/deleteAdmin?id="+id,
            type:"GET",
            //async:false,
            headers: {
                "Content-Type": "application/json;charset=utf8",
                'Accept': '*/*',
                "token":token
            },
            dataType:"json",
            success:function (data){
                if(data.code==200){
                    alert("删除成功!");
                    location.reload();//重新加载页面
                }
                else {
                    alert("删除失败!");
                }
            },
            error:function (){
                console.log("delete error");
            }
        })
    }
}
function psw_check(){//输入检查，检查两次输入密码是否一致
    var pwd_1=document.getElementById("password");
    var pwd_2=document.getElementById("password_again");
    if(pwd_1.value!==pwd_2.value){
        alert("两次密码输入不一致！");
        pwd_1.value="";
        pwd_2.value="";
    }
}